2020-2021 Sunseeker Telemetry and Lighting System
mpy32_ex13_saturationUnderflow.c File Reference
#include "driverlib.h"

Go to the source code of this file.

Functions

void main (void)
 

Variables

uint32_t Result
 
uint16_t Result_lower16
 
uint16_t Result_upper16
 

Function Documentation

◆ main()

void main ( void  )

Variable Documentation

◆ Result

uint32_t Result

MPY - Saturation Mpode Underflow Test

Description: The example illustrates a special case showing underflow. Underflow occurs when adding 2 negative numbers yields a positive result. By having the saturation mode enabled, the result if rounded off to the highest negative number (0x8000.0000 for 16 bit). Results can be viewed in the debugger window.

ACLK = 32.768kHz, MCLK = SMCLK = default DCO

Tested On: MSP430F5438A,MSP430FR5739,MSP430FR5969,MSP430FR2433

/ |
RST

| | | |

This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:

  • MPY peripheral

This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.

  • NONE

Definition at line 65 of file mpy32_ex13_saturationUnderflow.c.

Referenced by main().

◆ Result_lower16

uint16_t Result_lower16

Definition at line 66 of file mpy32_ex13_saturationUnderflow.c.

Referenced by main().

◆ Result_upper16

uint16_t Result_upper16

Definition at line 67 of file mpy32_ex13_saturationUnderflow.c.

Referenced by main().